import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      appBar: AppBar(
        title: const Center(
          child: Text(
            "appbar",
            textDirection: TextDirection.ltr,
            style: TextStyle(
                fontSize: 10,
                color: Colors.green,
                fontWeight: FontWeight.bold
            ),
          ),
        ),
        backgroundColor: Colors.deepPurpleAccent,
      ),
      body: Hoempae(),
      floatingActionButton: FloatingActionButton(
          child: Icon(Icons.add),
          onPressed: (){
            print("floatbtn.jk...");
          }),
    ),
  ));
}
class Hoempae extends StatefulWidget {
  const Hoempae({Key? key}) : super(key: key);

  @override
  _HoempaeState createState() => _HoempaeState();
}

class _HoempaeState extends State<Hoempae> {
  @override
  Widget build(BuildContext context) {
    return Column(children: [
      //1.RaisedButton
      RaisedButton(
          child: Text("Hoempae"),
          color: Colors.deepPurpleAccent,
          onPressed: (){
            print("click");
          }
          ),
      //2.FlatButton
      FlatButton(
          onPressed: (){
            print("click1");
          },
          color: Colors.red,
          child: Text("anniu")
      ),
      //3.OutlineButton
      OutlineButton(
          child: Text("put"),
          color: Colors.green,
          onPressed: (){
            print("dasfsa");
          }
      ),
      //4.FloatingActionButton
      FloatingActionButton(
          child: Icon(Icons.add),
          onPressed: (){
            print("floatbtn");
          }
      ),
      //  5.自定义button
      FlatButton(
          color: Colors.cyanAccent,
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(8),
          ),
          onPressed: (){
            print("fjfjfjf");
          },
          child: Row(
            mainAxisSize: MainAxisSize.min,
            children: const [
              Icon(Icons.ac_unit),
              Text("data")
            ],
          )
      )
    ],);
  }
}
